// @ts-ignore

 
import { api } from '@/utils/api';

/** 取消 POST /proRegularWorkRecord/cancel */
export async function proRegularWorkRecordCancel(
  body: BIZAPI.ProRegularWorkRecordCancelReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proRegularWorkRecordCancel(
  body: BIZAPI.ProRegularWorkRecordCancelReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proRegularWorkRecordCancel(
  body: BIZAPI.ProRegularWorkRecordCancelReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proRegularWorkRecordCancel(
  body: BIZAPI.ProRegularWorkRecordCancelReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proRegularWorkRecord/cancel`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proRegularWorkRecord/cancel`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 确认 POST /proRegularWorkRecord/confirm */
export async function proRegularWorkRecordConfirm(
  body: BIZAPI.ProRegularWorkRecordConfirmReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proRegularWorkRecordConfirm(
  body: BIZAPI.ProRegularWorkRecordConfirmReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proRegularWorkRecordConfirm(
  body: BIZAPI.ProRegularWorkRecordConfirmReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proRegularWorkRecordConfirm(
  body: BIZAPI.ProRegularWorkRecordConfirmReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proRegularWorkRecord/confirm`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proRegularWorkRecord/confirm`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取生产-定期工作记录数据 POST /proRegularWorkRecord/get */
export async function proRegularWorkRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultProRegularWorkRecordEntity>;

export async function proRegularWorkRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultProRegularWorkRecordEntity>>;

export async function proRegularWorkRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultProRegularWorkRecordEntity>;

export async function proRegularWorkRecordGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultProRegularWorkRecordEntity>(`/app/proRegularWorkRecord/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultProRegularWorkRecordEntity>(`/app/proRegularWorkRecord/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 处理 POST /proRegularWorkRecord/handle */
export async function proRegularWorkRecordHandle(
  body: BIZAPI.ProRegularWorkRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function proRegularWorkRecordHandle(
  body: BIZAPI.ProRegularWorkRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function proRegularWorkRecordHandle(
  body: BIZAPI.ProRegularWorkRecordHandleReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function proRegularWorkRecordHandle(
  body: BIZAPI.ProRegularWorkRecordHandleReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/proRegularWorkRecord/handle`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/proRegularWorkRecord/handle`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取生产-定期工作记录分页数据 POST /proRegularWorkRecord/page */
export async function proRegularWorkRecordPage(
  body: BIZAPI.ProRegularWorkRecordQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageProRegularWorkRecordEntity>;

export async function proRegularWorkRecordPage(
  body: BIZAPI.ProRegularWorkRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageProRegularWorkRecordEntity>>;

export async function proRegularWorkRecordPage(
  body: BIZAPI.ProRegularWorkRecordQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageProRegularWorkRecordEntity>;

export async function proRegularWorkRecordPage(
  body: BIZAPI.ProRegularWorkRecordQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageProRegularWorkRecordEntity>(`/app/proRegularWorkRecord/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageProRegularWorkRecordEntity>(`/app/proRegularWorkRecord/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 统计 POST /proRegularWorkRecord/statistics */
export async function proRegularWorkRecordStatistics(
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultProRegularWorkRecordStatisticsResp>;

export async function proRegularWorkRecordStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultProRegularWorkRecordStatisticsResp>>;

export async function proRegularWorkRecordStatistics(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultProRegularWorkRecordStatisticsResp>;

export async function proRegularWorkRecordStatistics(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultProRegularWorkRecordStatisticsResp>(
      `/app/proRegularWorkRecord/statistics`,
      {
        method: 'POST',
        ...(options || {}),
        tupleResponse: true
      }
    );
  }

  return api<BIZAPI.IResultProRegularWorkRecordStatisticsResp>(
    `/app/proRegularWorkRecord/statistics`,
    {
      method: 'POST',
      ...(options || {})
    }
  );
}
